import { Dispatch, State } from './types';

let dispatch: Dispatch;
let state: State;

export default (d: Dispatch, s: State): void => {
  dispatch = d;
  state = s;
};

export const setData = (value: any): void => {
  dispatch({ type: 'SET_DATA', value });
};

export const fetchFailed = (): void => {
  dispatch({ type: 'FETCH_FAILED' });
};

// 获取数据
export const getData = (): void => {};
